###########################################
#Makefile for simple programs
###########################################
INC=-I/usr/local/curl/include
LIB=-L/usr/local/curl/lib 

CC=g++
CC_FLAG=-Wall -g

PRG=run
OBJ=main.o httpclient.o
#CC_FLAG+=`pkg-config --cflags opencv`
LDFLAGS= -lrt -lssl /usr/local/curl/lib/libcurl.a#`pkg-config --libs opencv`


$(PRG):$(OBJ)
	$(CC) $(INC) $(LIB) -o $@ $(OBJ) $(LDFLAGS)
		
.SUFFIXES: .c .o .cpp
.cpp.o:
	 $(CC) $(CC_FLAG) $(INC) -c $*.cpp -o  $*.o

.PRONY:clean
clean:
	@echo "Removing linked and compiled files......"
	rm -f $(OBJ) $(PRG)
